{
  "properties" : { },
  "id" : "3936cc8b111343cb9ce45f1ef03a25b9",
  "script" : null,
  "groupId" : "8072991b1c194fb08fdf8da03cd8c54b",
  "name" : "配置巡检项",
  "createTime" : 1727071096389,
  "updateTime" : 1726306083369,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "bindAuditItem",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\"id\":\"1830529790264872960\",\"auditItemList\":\"1792468411493449729,1774717988867215362\"}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": true\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "id",
      "value" : "1828994943440404482",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }
}
================================
import org.springblade.core.tool.utils.StringUtil

db.table("ndmp_audit_task_rule").where().eq("task_id", body.id).delete()


var auditItemString = body.auditItemList
if (!StringUtil.isEmpty(auditItemString)) {

    var auditItemList = Arrays.asList(auditItemString.split(","))
 

    for (ruleId in auditItemList) {
        String id = IdUtil.getSnowflakeNextId()


        db.insert("""  insert into ndmp_audit_task_rule(id,task_id,rule_id) 
            values(#{id},#{body.id},#{ruleId})
  """)

    }

}

return true